# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=scalpel
pkgver=1.1687261
pkgrel=1
epoch=1
groups=('blackarch' 'blackarch-forensic')
pkgdesc='A frugal, high performance file carver.'
url='http://www.digitalforensicssolutions.com/Scalpel/'
arch=('x86_64' 'aarch64')
license=('GPL2')
depends=('glibc' 'tre')
makedepends=('git')
source=("$pkgname::git+http://github.com/BlackArch/Scalpel-2.0.git"
        'conf-location.patch')
sha512sums=('SKIP'
            'a1b03fe033a6941740b41f0c7febe3effccbfbdd8bc13400684997d92da15517d5747361971640e8dc68b8bfd54ff002900b468a918cf2d6d022ab64b2a8287d')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

prepare() {
  cd $pkgname

  patch -Np1 -i "$srcdir/conf-location.patch"
}

build() {
  cd $pkgname

  ./configure --prefix=/usr

  make
}

package() {
  cd $pkgname

  make DESTDIR="$pkgdir" install

  install -Dm 644 "conf/$pkgname.conf" "$pkgdir/etc/$pkgname/$pkgname.conf"
}

